package com.tbit.manager.api;

import com.tbit.common.entity.view.PageResult;
import com.tbit.common.entity.view.Result;
import com.tbit.manager.api.dto.DepositRefundPageDTO;
import com.tbit.manager.api.dto.OrderRefundDTO;
import com.tbit.manager.api.dto.TransactionOrderIncomeDTO;
import com.tbit.manager.enums.ApiConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

/**
 * 商户交易订单统计 openfeign接口
 *
 * @author ：zhangtianyou
 * @since 2024/9/23
 */
@FeignClient(name = ApiConstants.NAME)
public interface TransactionOrderStatApi {
    /**
     * 骑行卡、免押卡、会员卡、优惠券套餐退款(运维端调用)
     */
    @PostMapping(value = "/refundOperation/orderRefundApp.do", produces = "application/json", consumes = "application/json")
    Result<Integer> orderRefundApp(@Valid @RequestBody OrderRefundDTO orderRefundDTO);

    /**
     * 押金退款(运维端调用)
     */
    @PostMapping(value = "/refundOperation/depositRefundApp.do", produces = "application/json", consumes = "application/json")
    Result<Integer> depositRefundApp(@Valid @RequestBody DepositRefundPageDTO depositRefundPageDTO);

    /**
     * 根据订单编号查询,订单是否已开具发票
     */
    @PostMapping(value = "/invoice/queryOrderHasBeenInvoicedByOrderNoApp.do",consumes = "application/json")
    Result<Boolean> queryOrderHasBeenInvoicedByOrderNoApp(String orderNo);

    /**
     * 查询商户交易订单分页（运维端调用)
     */
    @PostMapping(value = "/transactionOrderStat/getIncomePageApp.do", produces = "application/json", consumes = "application/json")
    Result<PageResult<TransactionOrderIncomeDTO>> getIncomePageApp(@RequestBody TransactionOrderIncomeDTO transactionOrderIncomeDTO);
}
